Conditions | 1 |
Paths | 1 |
Total Lines | 30 |
Code Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | /* eslint-disable no-new */ |
||
22 | describe('jquery.nouislider-range-input', () => { |
||
23 | let $; |
||
24 | |||
25 | beforeEach(() => { |
||
26 | jest.resetModules(); |
||
|
|||
27 | $ = require('jquery'); |
||
28 | require('../src'); |
||
29 | }); |
||
30 | |||
31 | afterEach(resetBody); |
||
32 | |||
33 | test('register as a function on the jQuery prototype', () => { |
||
34 | expect($.fn.enableNoUISlider).to.be.a('function'); |
||
35 | }); |
||
36 | |||
37 | test('enable nouislider on a range input', () => { |
||
38 | setBody(template); |
||
39 | |||
40 | $('.my-custom-class-enabling-nouislider').enableNoUISlider(); |
||
41 | |||
42 | expect($('.my-custom-class-enabling-nouislider')) |
||
43 | .to.have.$class('js-nouislider-initialized'); |
||
44 | |||
45 | expect( |
||
46 | $('.my-custom-class-enabling-nouislider') |
||
47 | .siblings('div.nouislider-range-wrapper') |
||
48 | .children('div').eq(0) |
||
49 | ).to.have.$class('noUi-target'); |
||
50 | }); |
||
51 | }); |
||
52 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.